Making C++ Objects Persistent: the Hidden Pointers
نویسندگان
چکیده
C++ objects of types that have virtual functions or virtual base classes contain volatile (‘‘memory’’)pointers. We call such pointers ‘‘hidden pointers’ because they were not specified by the user. If such C++objects are made persistent, then these pointers become invalid across program invocations. Weencountered this problem in our implementation of O++, which is a database language based on C++. O++extends C++ with the ability to create and access persistent objects. In this paper, we describe the hidden pointers problem in detail and present several solutions to it. Oursolutions are elegant in that they do not require modifying the C++ compiler or the semantics of C++. Wealso discuss another problem that arises because C++ allows base class pointers to point to derived classobjects. C++ has emerged as the de facto standard language for software development, and databasesystems based on C++ have attracted much attention. We hope that the details and techniques presentedwill be useful to database researchers and to implementors of object-oriented database systems based onC++.
منابع مشابه
Constructing persistent object-oriented models with standard C++
In this paper, it is suggested an approach and a design pattern for developing object-oriented models that need to be persistent, including the databases of moderate size, with using only the standard C++ and its file storage facilities, and without using specific C++ dialects or any support of external libraries providing the persistence. Objects of the model may be of a great variety of types...
متن کاملObject Storage Management Architectures
This paper examines the architectural issues in building storage systems for object-oriented database management systems (OO DBMSs) and persistent languages. We survey techniques for placing small and large objects on disk and disk space management, and we present client-server architectures for OO DBMSs. We describe alternatives in making a programming language persistent and in particular, we...
متن کاملSome Reusability Exercises in Persistent C *
Software reuse within an integrated programming environment has several advantages. The persistent programming language pC extends the language C with two simple operations, one to store objects of any type in a file, and the other to retrieve objects. This paper shows how pC allows software reuse within the dynamics of a programming language environment. Functions can be made persistent and re...
متن کاملSmart Pointers: They're Smart, But They're Not Pointers
There are numerous times when a C ++ user could beneet from a pointer variant that has more functionality than is provided by the basic, language-deened pointer. For example, type-accurate garbage collection, reference counting, or transparent references to distributed or persistent objects, might be implemented with classes that provide pointer functionality. The C ++ language directly support...
متن کاملAdaptable Pointer Swizzling Strategies in Object Bases
In this paper we will classify and evaluate di erent approaches to optimizing the access to main memory resident persistent objects|techniques which are commonly referred to as \pointer swizzling". To speed up the access along inter-object references, the persistent pointers are transformed (swizzled) into main memory pointers (addresses). We will evaluate four di erent pointer swizzling techni...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Softw., Pract. Exper.
دوره 23 شماره
صفحات -
تاریخ انتشار 1993